<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="cache-control" content="no-cache" />
        <meta http-equiv="expires" content="0" />
        <title></title>
        <link rel="stylesheet" rev="stylesheet" href="{{$http_url}}/css/style.css" type="text/css" media="all" />
    </head>
    <body class="ContentBody">
        <form action="{{$http_url}}/depart/addDep/" method="post"  name="form" >
            <div class="MainDiv">
                <table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
                    <tr>
                        <th class="tablestyle_title" >{{if $depid}}编辑部门{{else}}添加部门{{/if}}</th>
                    </tr>
                    <tr>
                        <td class="CPanel">
                            <table border="0" cellpadding="0" cellspacing="0" style="width:100%">
                                <tr>
                                    <td width="100%">
                                        <fieldset style="height:100%;">
                                            <legend>部门信息</legend>
                                            <table border="0" cellpadding="2" cellspacing="1" style="width:100%">
                                                <tr>
                                                    <td nowrap align="right" width="15%">上级部门:</td>
                                                    <td width="35%"><select name="up_department">
                                                            <option value="" >------------</option>
                                                            {{foreach from=$dep_date item=list}}
                                                            {{if $dep.0.id!=$list.id}}
                                                            <option value="{{$list.id}}" {{if $dep.0.up_id==$list.id}} selected="selected" {{/if}}>{{$list.nickname}}</option>
                                                            {{/if}}
                                                            {{/foreach}}
                                                        </select></td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">部门名称:</td>
                                                    <td width="35%">
                                                        <input id="department" name='department' type="text" class="text" style="width:154px" {{if $dep.0.nickname}} value="{{$dep.0.nickname}}" {{/if}} />
                                                        <span class="red">*</span>
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                        </fieldset></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center" height="50px">
                            <input id="submit" type="submit" name="submit" value="保存" class="button" />　
                            <input type="button" name="Submit2" value="返回" class="button" onclick="window.history.go(-1);"/>
                        </td>
                    </tr>
                </table>
            </div>
            {{if $depid}}
            <input type="hidden" name="job" value="job">
            <input type="hidden" name="depid" value="{{$depid}}">
            {{/if}}
        </form>
    </body>
</html>
